<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>抖音热榜</title>
	<meta name="referrer" content="never">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link rel="stylesheet" href="http://47.101.136.156:8888/layui/css/layui.css" media="all">
		<style>
			.flow-default {
				width: auto;
				height: auto;
				overflow: auto;
				font-size: 0;
			}
			
			.flow-default li {
				display: inline-block;
				margin: 0 5px;
				font-size: 14px;
				width: 44%;
				margin-bottom: 10px;
				height: 44%;
				line-height: 200%;
				text-align: center;
				background-color: #eee;
			}
			
			.flow-default img {
				width: 100%;
				height: 100%;
			}
		</style>
	</head>

	<body>
		<form class="layui-form" action="" id="form">

		</form>
		<ul id="list" class="flow-default" style="text-align: center;"></ul>
		<script src="http://47.101.136.156:8888/layui/layui.js" charset="utf-8"></script>
		<script>
			var url = 'http://47.101.136.156:8888/douyin_hot';
			getData();
			function getData() {
				layui.use('flow', function() {
					var $ = layui.jquery;
					var flow = layui.flow;
					flow.load({
						elem: '#list',
						isAuto: true,
						isLazyimg: true,
						done: function(page, next) {
							var lis = [];
							$.get(url, function(res) {
								layui.each(res.data, function(index, item) {
									lis.push('<li onclick="window.open(&apos;' + item.url + '&apos;)"><img title="' + item.desc + '" lay-src="' + item.img + '"><span >' + item.desc + '</span></li>');
								});
								next(lis.join(''), false);
							});
						}
					});
				});
			}
		</script>
	</body>

</html>